Description of a Parameter. More...
#include <vstparameters.h>
Public Member Functions | |
Parameter () | |
Parameter (const ParameterInfo &) | |
Parameter (const TChar *title, ParamID tag, const TChar *units=0, ParamValue defaultValueNormalized=0., int32 stepCount=0, int32 flags=ParameterInfo::kCanAutomate, UnitID unitID=kRootUnitId) | |
virtual | ~Parameter () |
const ParameterInfo & | getInfo () const |
Returns its readonly info. | |
ParameterInfo & | getInfo () |
Returns its writeable info. | |
void | setUnitID (UnitID id) |
Sets its associated UnitId. | |
UnitID | getUnitID () |
Gets its associated UnitId. | |
ParamValue | getNormalized () const |
Gets its normalized value [0.0, 1.0]. | |
virtual bool | setNormalized (ParamValue v) |
Sets its normalized value [0.0, 1.0]. | |
virtual void | toString (ParamValue valueNormalized, String128 string) const |
Converts a normalized value to a string. | |
virtual bool | fromString (const TChar *string, ParamValue &valueNormalized) const |
Converts a string to a normalized value. | |
virtual ParamValue | toPlain (ParamValue valueNormalized) const |
Converts a normalized value to plain value (e.g. | |
virtual ParamValue | toNormalized (ParamValue plainValue) const |
Converts a plain value to a normalized value (e.g. | |
int32 | getPrecision () const |
Gets the current precision (used for string representation of float). | |
void | setPrecision (int32 val) |
Sets the precision for string representation of float value (for example 4.34 with 2 as precision). | |
Data Fields | |
OBJ_METHODS(Parameter, FObject) protected ParamValue | valueNormalized |
int32 | precision |
Description of a Parameter.
Parameter | ( | ) |
Parameter | ( | const ParameterInfo & | info | ) |
Parameter | ( | const TChar * | title, | |
ParamID | tag, | |||
const TChar * | units = 0 , |
|||
ParamValue | defaultValueNormalized = 0. , |
|||
int32 | stepCount = 0 , |
|||
int32 | flags = ParameterInfo::kCanAutomate , |
|||
UnitID | unitID = kRootUnitId | |||
) |
~Parameter | ( | ) | [virtual] |
const ParameterInfo& getInfo | ( | ) | const [inline] |
Returns its readonly info.
ParameterInfo& getInfo | ( | ) | [inline] |
Returns its writeable info.
void setUnitID | ( | UnitID | id | ) | [inline] |
Sets its associated UnitId.
UnitID getUnitID | ( | ) | [inline] |
Gets its associated UnitId.
ParamValue getNormalized | ( | ) | const [inline] |
Gets its normalized value [0.0, 1.0].
bool setNormalized | ( | ParamValue | v | ) | [virtual] |
Sets its normalized value [0.0, 1.0].
void toString | ( | ParamValue | valueNormalized, | |
String128 | string | |||
) | const [virtual] |
Converts a normalized value to a string.
Reimplemented in RangeParameter, and StringListParameter.
bool fromString | ( | const TChar * | string, | |
ParamValue & | valueNormalized | |||
) | const [virtual] |
Converts a string to a normalized value.
Reimplemented in RangeParameter, and StringListParameter.
ParamValue toPlain | ( | ParamValue | valueNormalized | ) | const [virtual] |
Converts a normalized value to plain value (e.g.
0.5 to 10000.0Hz).
Reimplemented in RangeParameter, and StringListParameter.
ParamValue toNormalized | ( | ParamValue | plainValue | ) | const [virtual] |
Converts a plain value to a normalized value (e.g.
10000 to 0.5).
Reimplemented in RangeParameter, and StringListParameter.
int32 getPrecision | ( | ) | const [inline] |
Gets the current precision (used for string representation of float).
void setPrecision | ( | int32 | val | ) | [inline] |
Sets the precision for string representation of float value (for example 4.34 with 2 as precision).
OBJ_METHODS (Parameter, FObject) protected ParamValue valueNormalized |